package com.drugmanage.utils;


import com.drugmanage.exception.NoLoginException;
import com.drugmanage.exception.ParamsExcetion;

public class AssertUtil {
	
	public static void isTure(Boolean flag,String errorMsg) {
		if(flag){
			throw new ParamsExcetion(errorMsg);
		}
	}
	
	public static void isTure(Boolean flag,String errorMsg,Integer errorCode) {
		if(flag){
			throw new ParamsExcetion(errorMsg,errorCode);
		}
	}
	public static void Nologin(Boolean flag,String errorMsg) {
		if(flag){
			throw new NoLoginException(errorMsg);
		}
	}
	
}
